<p>You can easily control dropdowns programmatically using the exported dropdown instance.</p>

<div class="d-inline-block" ngbDropdown #myDrop="ngbDropdown">
	<button
		type="button"
		class="btn btn-outline-primary me-2"
		id="dropdownManual"
		ngbDropdownAnchor
		(focus)="myDrop.open()"
	>
		Toggle dropdown
	</button>
	<div ngbDropdownMenu aria-labelledby="dropdownManual">
		<button ngbDropdownItem>Action - 1</button>
		<button ngbDropdownItem>Another Action</button>
		<button ngbDropdownItem>Something else is here</button>
	</div>
</div>

<button type="button" class="btn btn-outline-success me-2" (click)="$event.stopPropagation(); myDrop.open()">
	Open from outside
</button>
<button type="button" class="btn btn-outline-danger me-2" (click)="$event.stopPropagation(); myDrop.close()">
	Close from outside
</button>
